﻿namespace Pub.Class
{
    using System;

    public class UrlParameter
    {
        public string ParameterName;
        public string ParameterValue;

        public UrlParameter(string Name, object Value)
        {
            this.ParameterName = Name;
            this.ParameterValue = Value.ToString();
        }

        public UrlParameter(string Name, string Value)
        {
            this.ParameterName = Name;
            this.ParameterValue = Value;
        }

        public string ToEncodeString()
        {
            return string.Format("{0}={1}", this.ParameterName, this.ParameterValue.UrlEncode());
        }

        public override string ToString()
        {
            return string.Format("{0}={1}", this.ParameterName, this.ParameterValue);
        }
    }
}

